﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Sales
{
    public class InvoiceDetail : BusinessObject
    {
        public InvoiceDetail()
        {
            AddRule(new ValidateRequired("RefDetailID"));

            AddRule(new ValidateRequired("RefID"));

            AddRule(new ValidateRequired("RestaurantMenuID"));
        }

        public InvoiceDetail(string refDetailId, string refId, string restaurantMenuId, string description, string unitId, decimal quantity,
                                decimal unitPrice, decimal amount, decimal discountRate, decimal discountAmount, decimal vatRate,
                                decimal vatAmount, string vatDescription)
            : this()
        {
            RefDetailID = refDetailId;
            RefID = refId;
            RestaurantMenuID = restaurantMenuId;
            Description = description;
            UnitID = unitId;
            Quantity = quantity;
            UnitPrice = unitPrice;
            Amount = amount;
            DiscountRate = discountRate;
            DiscountAmount = discountAmount;
            VATRate = vatRate;
            VATAmount = vatAmount;
            VATDescription = vatDescription;
        }

        public string RefDetailID { get; set; }

        public string RefID { get; set; }

        public string RestaurantMenuID { get; set; }

        public string Description { get; set; }

        public string UnitID { get; set; }

        public decimal Quantity { get; set; }

        public decimal UnitPrice { get; set; }

        public decimal Amount { get; set; }

        public decimal DiscountRate { get; set; }

        public decimal DiscountAmount { get; set; }

        public decimal VATRate { get; set; }

        public decimal VATAmount { get; set; }

        public string VATDescription { get; set; }
    }
}